home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbfaqr01.zip
/
ARCSINE.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-08-10
|
648b
|
16 lines
'Date: 03-24-92 (16:16)
'From: DAVID WILLIAMS
'Subj: INVERTING 'COS'
'-------------------------------------------------------------------------
'PI=4*ATN(1)
'DEF FNARCSIN(X)=ATN(X/SQR(1-X*X))
'DEF FNARCCOS(X)=PI/2-FNARCSIN(X)
'These will give you the arc-cosine (or the arc-sine) of any number that
'is LESS than one and GREATER than -1. If you think you will ever get the
'exact values 1 or -1, which are legal arguments for the functions but
'which produce a "divide by zero" error in FNARCSIN, you must take care
'to trap them out and treat them separately.
'The results are in radians. If you want degrees, multiply by 180/PI.